package com.yanqu.road.entity.activity.oldplayerreturn;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.player.UserBaseInfo;

import java.util.Map;
import java.util.Objects;

/**
 * @author ：zfr
 * @date ：2021/12/6 18:39
 */
public class OldPlayerReturnUserData extends DataObject {
    private int activityId;
    private int activityType;
    private long userId;
    private long newServerId;
    private long newUserId;
    private long newTime;
    private UserBaseInfo newUserBaseInfo;
    private boolean sendReturnConditionRewardState;
    private long oldServerId;
    private long oldUserId;
    private long oldTime;
    private long vipExp;
    private String returnVipExpConfig;
    private UserBaseInfo oldUserBaseInfo;
    private boolean sendBindConditionRewardState;
    private int sendRewardDays;
    private boolean sendBindRewardOver;
    private boolean isReturn;
    private long returnTime;
    private long lastRefreshTime;
    private boolean isGetEventReward;
    private int eventId;
    private String placeId;
    private boolean whiteBindEffect;
    private long gotCardTrialTime;  //获取免费试用的时间
    private boolean hadBuyCheapCard;    //是否购买过便宜月卡
    private Map<Integer,Integer> rmbMallLimit;//现金礼包购买限制


    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public int getActivityType() {
        return activityType;
    }

    public void setActivityType(int activityType) {
        if (this.activityType != activityType) {
            this.activityType = activityType;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public long getNewServerId() {
        return newServerId;
    }

    public void setNewServerId(long newServerId) {
        if (this.newServerId != newServerId) {
            this.newServerId = newServerId;
            setUpdateOption();
        }
    }

    public long getNewUserId() {
        return newUserId;
    }

    public void setNewUserId(long newUserId) {
        if (this.newUserId != newUserId) {
            this.newUserId = newUserId;
            setUpdateOption();
        }
    }

    public long getNewTime() {
        return newTime;
    }

    public void setNewTime(long newTime) {
        if (this.newTime != newTime) {
            this.newTime = newTime;
            setUpdateOption();
        }
    }

    public long getOldServerId() {
        return oldServerId;
    }

    public void setOldServerId(long oldServerId) {
        if (this.oldServerId != oldServerId) {
            this.oldServerId = oldServerId;
            setUpdateOption();
        }
    }

    public long getOldUserId() {
        return oldUserId;
    }

    public void setOldUserId(long oldUserId) {
        if (this.oldUserId != oldUserId) {
            this.oldUserId = oldUserId;
            setUpdateOption();
        }
    }

    public long getOldTime() {
        return oldTime;
    }

    public void setOldTime(long oldTime) {
        if (this.oldTime != oldTime) {
            this.oldTime = oldTime;
            setUpdateOption();
        }
    }

    public boolean isReturn() {
        return isReturn;
    }

    public void setReturn(boolean aReturn) {
        if (isReturn != aReturn) {
            isReturn = aReturn;
            setUpdateOption();
        }
    }

    public UserBaseInfo getOldUserBaseInfo() {
        return oldUserBaseInfo;
    }

    public void setOldUserBaseInfo(UserBaseInfo oldUserBaseInfo) {
        if (!Objects.equals(this.oldUserBaseInfo, oldUserBaseInfo)) {
            this.oldUserBaseInfo = oldUserBaseInfo;
            setUpdateOption();
        }
    }

    public long getReturnTime() {
        return returnTime;
    }

    public void setReturnTime(long returnTime) {
        if (this.returnTime != returnTime) {
            this.returnTime = returnTime;
            setUpdateOption();
        }
    }

    public UserBaseInfo getNewUserBaseInfo() {
        return newUserBaseInfo;
    }

    public void setNewUserBaseInfo(UserBaseInfo newUserBaseInfo) {
        if (!Objects.equals(this.newUserBaseInfo, newUserBaseInfo)) {
            this.newUserBaseInfo = newUserBaseInfo;
            setUpdateOption();
        }
    }

    public boolean isSendReturnConditionRewardState() {
        return sendReturnConditionRewardState;
    }

    public void setSendReturnConditionRewardState(boolean sendReturnConditionRewardState) {
        if (this.sendReturnConditionRewardState != sendReturnConditionRewardState) {
            this.sendReturnConditionRewardState = sendReturnConditionRewardState;
            setUpdateOption();
        }
    }

    public boolean isSendBindConditionRewardState() {
        return sendBindConditionRewardState;
    }

    public void setSendBindConditionRewardState(boolean sendBindConditionRewardState) {
        if (this.sendBindConditionRewardState != sendBindConditionRewardState) {
            this.sendBindConditionRewardState = sendBindConditionRewardState;
            setUpdateOption();
        }
    }

    public long getVipExp() {
        return vipExp;
    }

    public void setVipExp(long vipExp) {
        if (this.vipExp != vipExp) {
            this.vipExp = vipExp;
            setUpdateOption();
        }
    }

    public int getSendRewardDays() {
        return sendRewardDays;
    }

    public void setSendRewardDays(int sendRewardDays) {
        if (this.sendRewardDays != sendRewardDays) {
            this.sendRewardDays = sendRewardDays;
            setUpdateOption();
        }
    }

    public boolean isSendBindRewardOver() {
        return sendBindRewardOver;
    }

    public void setSendBindRewardOver(boolean sendBindRewardOver) {
        if (this.sendBindRewardOver != sendBindRewardOver) {
            this.sendBindRewardOver = sendBindRewardOver;
            setUpdateOption();
        }
    }

    public long getLastRefreshTime() {
        return lastRefreshTime;
    }

    public void setLastRefreshTime(long lastRefreshTime) {
        if (this.lastRefreshTime != lastRefreshTime) {
            this.lastRefreshTime = lastRefreshTime;
            setUpdateOption();
        }
    }

    public boolean isGetEventReward() {
        return isGetEventReward;
    }

    public void setGetEventReward(boolean getEventReward) {
        if (isGetEventReward != getEventReward) {
            isGetEventReward = getEventReward;
            setUpdateOption();
        }
    }

    public int getEventId() {
        return eventId;
    }

    public void setEventId(int eventId) {
        if (this.eventId != eventId) {
            this.eventId = eventId;
            setUpdateOption();
        }
    }

    public String getPlaceId() {
        return placeId;
    }

    public void setPlaceId(String placeId) {
        if (!Objects.equals(this.placeId, placeId)) {
            this.placeId = placeId;
            setUpdateOption();
        }
    }

    public String getReturnVipExpConfig() {
        return returnVipExpConfig;
    }

    public void setReturnVipExpConfig(String returnVipExpConfig) {
        if (!Objects.equals(this.returnVipExpConfig, returnVipExpConfig)) {
            this.returnVipExpConfig = returnVipExpConfig;
            setUpdateOption();
        }
    }

    public boolean isWhiteBindEffect() {
        return whiteBindEffect;
    }

    public void setWhiteBindEffect(boolean whiteBindEffect) {
        if (this.whiteBindEffect != whiteBindEffect) {
            this.whiteBindEffect = whiteBindEffect;
            setUpdateOption();
        }
    }

    public long getGotCardTrialTime() {
        return gotCardTrialTime;
    }

    public void setGotCardTrialTime(long gotCardTrialTime) {
        if (this.gotCardTrialTime != gotCardTrialTime){
            this.gotCardTrialTime = gotCardTrialTime;
            setUpdateOption();
        }
    }

    public boolean isHadBuyCheapCard() {
        return hadBuyCheapCard;
    }

    public void setHadBuyCheapCard(boolean hadBuyCheapCard) {
        if (this.hadBuyCheapCard != hadBuyCheapCard){
            this.hadBuyCheapCard = hadBuyCheapCard;
        }
        setUpdateOption();
    }

    public Map<Integer, Integer> getRmbMallLimit() {
        return rmbMallLimit;
    }

    public void setRmbMallLimit(Map<Integer, Integer> rmbMallLimit) {
        this.rmbMallLimit = rmbMallLimit;
        setUpdateOption();
    }

    public boolean isAlreadyBind() {
        return oldUserId != 0 || isWhiteBindEffect();
    }

    public void resetReturn() {
        setNewServerId(0L);
        setNewUserId(0L);
        setNewTime(0L);
        setNewUserBaseInfo(null);
        setSendReturnConditionRewardState(false);
        setReturn(false);
        setReturnTime(0L);
        setLastRefreshTime(0L);
        setEventId(0);
        setPlaceId("");
        setGotCardTrialTime(0);
        setHadBuyCheapCard(false);
    }
}
